function Tab(el) {
    this.el = document.querySelector(el)

    this.init()

}
Tab.prototype.init = function () {
    this.titleover()

}
Tab.prototype.titleover = function () {
    let ulLiObjs = this.el.querySelectorAll('ul li')
    ulLiObjs.forEach((item, i) => {
        item.onmouseover = () => {
            this.el.querySelector('ul li.active').className = ''
            item.className = 'active'
            this.el.querySelector('ol li.active').className = ''
            // let olLiObjs = document.querySelectorAll('ol li')
            // olLiObjs[i].className = 'active'
            this.el.querySelector(`ol li:nth-of-type(${i + 1}) `).className = 'active'
        }
    })
}
export default Tab
